#include "gx_problem.h"

int number_of_one(unsigned char dat)
{
	int num = 0;

	while(dat)
	{
		num += dat&0x1;
		dat>>=1;
	}

	return num;
}

int number_of_one1(unsigned char dat)
{
	int num =0;

	while(dat)
	{
		dat&=dat-1;
		num++;
	}

	return num;
}
